  {% include "header.html" %}
  <script type="text/javascript" >
    var agency_id = "{{ agency_id }}";
    var route_type = "{{ route_type }}";
  </script>
  <h1>Service Calendar  List <a href="http://code.google.com/transit/spec/transit_feed_specification.html#routes_txt___Field_Definitions">Refer</a></h1>
  {% if prompt %}
  <p id="prompt">{{ prompt }}</p>
  {% endif %}
  <div id="editor">
    <form method="POST" action="{{ url }}" id="editorform">
      <table>
        <tr>
          <th>Items</th>
          <th>Values</th>
        </tr>
        <tr>
          <td>ID</td>
          <td><input name = "service_id" id = "service_id" type="TEXT" value="{{ service.id }}"/></td>
        </tr>
        <tr>
          <td>Monday</td>
          <td>
          {% if service.monday %}
          <input name = "monday" type="radio" value="1" checked/>Available <input name = "monday" type="radio" value="0"/>N/A
          {% else %}
          <input name = "monday" type="radio" value="1" />Available <input name = "monday" type="radio" value="0" checked/>N/A
          {% endif %}
          </td>
        </tr>
        <tr>
          <td>Tuesday</td>
          <td>
          {% if service.tuesday %}
          <input name = "tuesday" type="radio" value="1" checked/>Available <input name = "tuesday" type="radio" value="0"/>N/A
          {% else %}
          <input name = "tuesday" type="radio" value="1" />Available <input name = "tuesday" type="radio" value="0" checked/>N/A
          {% endif %}
          </td>
        </tr>
        <tr>
          <td>Wednesday</td>
          <td>
          {% if service.wednesday %}
          <input name = "wednesday" type="radio" value="1" checked/>Available <input name = "wednesday" type="radio" value="0"/>N/A
          {% else %}
          <input name = "wednesday" type="radio" value="1" />Available <input name = "wednesday" type="radio" value="0" checked/>N/A
          {% endif %}
          </td>
        </tr>
        <tr>
          <td>Thursday</td>
          <td>
          {% if service.thursday %}
          <input name = "thursday" type="radio" value="1" checked/>Available <input name = "thursday" type="radio" value="0"/>N/A
          {% else %}
          <input name = "thursday" type="radio" value="1" />Available <input name = "thursday" type="radio" value="0" checked/>N/A
          {% endif %}
          </td>
        </tr>
        <tr>
          <td>Friday</td>
          <td>
          {% if service.friday %}
          <input name = "friday" type="radio" value="1" checked/>Available <input name = "friday" type="radio" value="0"/>N/A
          {% else %}
          <input name = "friday" type="radio" value="1" />Available <input name = "friday" type="radio" value="0" checked/>N/A
          {% endif %}
          </td>
        </tr>
        <tr>
          <td>Saturday</td>
          <td>
          {% if service.saturday %}
          <input name = "saturday" type="radio" value="1" checked/>Available <input name = "saturday" type="radio" value="0"/>N/A
          {% else %}
          <input name = "saturday" type="radio" value="1" />Available <input name = "saturday" type="radio" value="0" checked/>N/A
          {% endif %}
          </td>
        </tr>
        <tr>
          <td>Sunday</td>
          <td>
          {% if service.sunday %}
          <input name = "sunday" type="radio" value="1" checked/>Available <input name = "sunday" type="radio" value="0"/>N/A
          {% else %}
          <input name = "sunday" type="radio" value="1" />Available <input name = "sunday" type="radio" value="0" checked/>N/A
          {% endif %}
          </td>
        </tr>
        <tr>
          <td>Start Date</td>
          <td><input name = "start_date" type="text" value="{{ service.start_date }}"/></td>
        </tr>
        <tr>
          <td>End Date</td>
          <td><input name = "end_date" type="text" value="{{ service.end_date }}"/></td>
        </tr>
        <tr>
          <td colspan="2">
            <input type="submit" id = "submit" value="{{ submit }}" name = "submit" />
          </td>
        </tr>
        </table>
  </form>


</div>
<div class="sort">
  <form method="POST" action="" name="search">
    <input type="text" value=""/> <input type="submit" value="Search"/>
  </form>


    </div>
    <div class="pager">
      paging info: [<a href="#">1</a>] [<a href="#">2</a>] ... [<a href="#">last</a>] <input type="text" value="" size="4" maxlength="4"/> <input type="submit" value="Go" />
    </div>
    <table>
      <tr>
    <th>&nbsp;</th>
    <th>Service ID</th>
    <th>Monday</th>
    <th>Tuesday</th>
    <th>Wednesday</th>
    <th>Thursday</th>
    <th>Friday</th>
    <th>Saturday</th>
    <th>Sunday</th>
    <th>Start Date</th>
    <th>End Date</th>
    <th>Action</th>
      </tr>
      {% for service in services %}
      <tr>
        <td><input type="checkbox" name="deleteid" value="{{service.id}}"/></td>
        <td>{{service.id}}</td>
        <td>{{service.monday}}</td>
        <td>{{service.tuesday}}</td>
        <td>{{service.wednesday}}</td>
        <td>{{service.thursday}}</td>
        <td>{{service.friday}}</td>
        <td>{{service.saturday}}</td>
        <td>{{service.sunday}}</td>

        <td>{{service.start_date}}</td>
        <td>{{service.end_date}}</td>
        <td>
          <a href="/admin/calendar?act=edit&id={{service.id}}">Edit</a>&nbsp;
          <a href="/admin/calendar?act=delete&id={{service.id}}">Delete</a>
        </td>
      </tr>
      {% endfor %}
    </table>
    <div class="pager">
      [<a href="#">1</a>] [<a href="#">2</a>] ... [<a href="#">last</a>] <input type="text" value="" size="4" maxlength="4"/> <input type="submit" value="Go" />
    </div>
    <div class="control">
      <input type="submit" value="Delete All"/>
    </div>
  </body>
</html>
